<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    jquery中的$.post()函数的功能单一，专门用来发起post请求，从而向服务器提交数据
    <br>
    <button id="btn">发起post请求</button>
    <script src="./jquery.js"></script>
    <script>
        // post请求：将数据提交给服务端
        $('#btn').on('click',function() {
            $.post('http://www.liulongbin.top:3006/api/addbook',{bookname:'鼠标',author:'电脑',publisher:'2a511'
            },function(res) {
                console.log(res);
            })
        })
    </script>
</body>
</html>